<?php
namespace app\api\validate\product;
use think\Validate;
class ProductValidate extends Validate
{
    protected $rule = [
        'product_id' => 'require',
        'product_num' => 'require|number',
    ];

    protected $message = [
        'product_id.require' => '商品ID不能为空',
        //'spec_sku_id.require' => '商品规格ID不能为空',
        'product_num.require' => '商品数量不能为空',
        'product_num.number' => '商品数量格式错误',
    ];
    protected $scene = [
        'price' => ['product_id', 'product_num'],
    ];
}